package com.dynamic.idea.quick.develop.plugin.entity.base02.model;

import org.apache.commons.lang3.StringUtils;

/**
 * 导入的请求参数的包结构
 */
public class RequestParamStruct extends ImportStruct {

    /**
     * 参数名
     */
    private String paramName;

    /**
     * 注释
     */
    private String comment;

    // get/set方法

    /**
     * 全限定类名+参数名
     * @return
     */
    public String showQualifiedNameParam() {
        String qualifiedName = super.showQualifiedName();
        if (StringUtils.isBlank(qualifiedName)){
            return paramName;
        }
        if (StringUtils.isBlank(paramName)){
            return qualifiedName;
        }

        return qualifiedName+" "+StringUtils.trim(paramName);
    }

    /**
     * 简单类名+方法名
     * @return
     */
    public String showSimpleNameParam() {
        String simpleName = super.showSimpleName();
        if (StringUtils.isBlank(simpleName)){
            return paramName;
        }
        if (StringUtils.isBlank(paramName)){
            return simpleName;
        }

        return simpleName+" "+StringUtils.trim(paramName);
    }

    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }
}
